# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gnome-contacts
pkgver=42.0
pkgrel=1
pkgdesc="A contacts manager for GNOME"
url="https://wiki.gnome.org/Apps/Contacts"
# s390x and riscv64 blocked by gtk4
arch="all !s390x !riscv64"
license="GPL-2.0-or-later"
makedepends="
	evolution-data-server-dev
	folks-dev
	glib-dev
	gnome-desktop-dev
	gnome-online-accounts-dev
	gtk4.0-dev
	libadwaita-dev
	libgee-dev
	libportal-dev
	meson
	telepathy-glib-dev
	vala
	"
checkdepends="appstream-glib desktop-file-utils"
subpackages="$pkgname-lang $pkgname-doc"
source="https://download.gnome.org/sources/gnome-contacts/${pkgver%.*}/gnome-contacts-$pkgver.tar.xz
	reduce-width.patch
	"

build() {
	abuild-meson \
		-Dtelepathy=true \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
09a0d70a1550136717c4f837f2e4526928559de4bccedb71b34a216d99c36886bfd5786fcc3487198c488b4778046453d0069da55ab283ef87513c2d668a11cd  gnome-contacts-42.0.tar.xz
4807f66470915de22a4ec77c2444e3fb126fc8bf2e87ef62b193fdb8e4604d89776efeace7fa45a3c7f13d14290d53fa2590d2cd67a87e900ae1575fe7449bc3  reduce-width.patch
"
